Fixed import conflict from deprecated biotite function needed by ESM #1
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Current version of Colab notebook
stab_ESM_IF.ipynb
crashes during the first import step:`installing libs...
installing esmfold...
downloading params...
ImportError Traceback (most recent call last)
in
/usr/local/lib/python3.10/dist-packages/esm/inverse_folding/init.py in
4 # LICENSE file in the root directory of this source tree.
5
----> 6 from . import gvp_transformer
7 from . import util
8 from . import multichain_util
2 frames
/usr/local/lib/python3.10/dist-packages/esm/inverse_folding/util.py in
10 from biotite.structure.io import pdbx, pdb
11 from biotite.structure.residues import get_residues
---> 12 from biotite.structure import filter_backbone
13 from biotite.structure import get_chains
14 from biotite.sequence import ProteinSequence
ImportError: cannot import name 'filter_backbone' from 'biotite.structure' (/usr/local/lib/python3.10/dist-packages/biotite/structure/init.py)`
Looking at the Biotite API, this function was deprecated with the 1.0 (current) release. To fix this, the pip install command for biotite needs to be changed to explicitly request the old version:
os.system(f"pip install biotite==0.41")
I have tested this on 10x input structures and it now seems to work as intended. Thanks for making this project open source and user-friendly!